A driver is a computer program which allows higher-level computer programs to interact with a hardware device. A sensor is a chip that can detect physical quantity and convert it into electronic signals that is readable by computer programs within the device. A driver is necessary for a processor to interact with a sensor.
Conventionally, a self-test program is a separate program that runs in the user space of a memory associated with the device. This has several disadvantages. First, the self-test program is a separate program from the driver, and therefore could be lost or mismatched with the driver. If the driver is upgraded to a newer version and an old self-test program is used, an incorrect result could be generated.
Second, providing the self-test program within in the user space is more complicated because a separate software program has to be copied into the operating system of the device. This may not be convenient or even not allowed in some situations. Third, it provides for the possibility of a hacker providing a fake self-test program. If a fake program is utilized to provide the self-test function the result is completely un-predictable.
Accordingly what is needed is a system and method that addresses the above identified issues. The present invention addresses such a need.